<template>
    <el-dialog :title="rowInfo ? '修改' : '添加'" :visible.sync="open" width="50%" append-to-body
        :before-close="closeDelDialog">
        <el-form ref="form" :model="form" :rules="rules" label-width="140px" class="margin_top">
            <el-row>

                <el-col :span="12">
                    <el-form-item label="鉴定任务名称 " prop="jiandingrenwuname">
                        <el-input v-model="form.jiandingrenwuname" placeholder="请输入鉴定任务名称" maxlength="30" />
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="档案门类" prop="categoryId">
                        <!-- <el-select v-model="form.categoryId" placeholder="请选择档案门类" style="width:100%"
                            @change="changeSelectTap" :disabled="isDisabled=='allow' ? false : true">
                            <el-option v-for="item in deptOptions" :key="item.id" :label="item.label" :value="item.id">
                            </el-option>
                        </el-select> -->
                        <treeselect v-model="form.categoryId" :options="deptOptions" :disable-branch-nodes="true" label
                            placeholder="请选择档案门类" noOptionsText="暂无数据" @select="changeSelectTap"
                            :normalizer="normalizerCategoryID"
                            :style="isStyle ? 'line-height: 32px;font-size:12px' : 'line-height: 36px;font-size:14px'" />
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <el-form-item label="批次号" prop="renwuno">
                        <el-input v-model="form.renwuno" placeholder="请输入批次号" readonly :disabled="rowInfo ? true : false" />
                    </el-form-item>
                </el-col>
                <el-col :span="12">

                    <el-form-item label="全宗号" prop="qzhcode">
                        <el-input v-model="form.qzhcode" placeholder="请选择" maxlength="20" readonly
                            :disabled="rowInfo ? true : false" />
                    </el-form-item>
                </el-col>

            </el-row>
            <el-row>
                <el-col :span="12">
                    <el-form-item label="鉴定任务创建日期" prop="jiandingstartdate">
                        <el-input v-model="form.jiandingstartdate" placeholder="请输入鉴定任务创建日期" readonly
                            :disabled="rowInfo ? true : false" />
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <el-form-item label="鉴定组组长" prop="jiandingleader">
                        <treeselect v-model="form.jiandingleader" :options="userTreeList" placeholder="请选择鉴定组组长"
                            :disable-branch-nodes="true" :normalizer="normalizer" noOptionsText="暂无数据"
                            :style="isStyle ? 'line-height: 32px;font-size:12px' : 'line-height: 36px;font-size:14px'" />
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="初审组人员" prop="chushenpeople">
                        <!--     @deselect="deSelectPatenteeidsDepart" // 选择项被取消时的函数
                         @select="selectPatenteeidsDepart"  //选择项被选择时的函数 -->
                        <treeselect v-model="form.chushenpeople" :options="userTreeList" placeholder="请选择初审组人员"
                            :disable-branch-nodes="true" :multiple="true" @deselect="deSelectPatenteeidsDepart"
                            @select="selectPatenteeidsDepart" :normalizer="normalizer" noOptionsText="暂无数据"
                            :style="isStyle ? 'line-height: 32px;font-size:12px' : 'line-height: 36px;font-size:14px'" />
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <el-form-item label="复审组人员" prop="fushenpeople">
                        <!--     @deselect="deSelectPatenteeidsDepart" // 选择项被取消时的函数
                         @select="selectPatenteeidsDepart"  //选择项被选择时的函数 -->
                        <treeselect v-model="form.fushenpeople" :options="userTreeList" placeholder="请选择复审组人员"
                            :disable-branch-nodes="true" :multiple="true" @deselect="deSelectPatenteeidsDepart1"
                            @select="selectPatenteeidsDepart1" :normalizer="normalizer" noOptionsText="暂无数据"
                            :style="isStyle ? 'line-height: 32px;font-size:12px' : 'line-height: 36px;font-size:14px'" />
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="审定组人员" prop="shendingpeople">

                        <treeselect v-model="form.shendingpeople" :options="userTreeList" placeholder="请选择审定组人员"
                            :disable-branch-nodes="true" :normalizer="normalizer" noOptionsText="暂无数据"
                            :style="isStyle ? 'line-height: 32px;font-size:12px' : 'line-height: 36px;font-size:14px'" />

                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item label="备注">
                        <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>

            <el-row>
                <el-col :span="24">

                    <el-form-item label="附件">
                        <el-upload v-if="!rowInfo" multiple action="#" :show-file-list="false" :on-change="handleChange"
                            :auto-upload="false" class="upload-file-uploader" ref="fileUpload">
                            　<el-button class="upload_btn" type="primary" icon="el-icon-upload"
                                style="margin-left:0">上传文件</el-button>
                            <!-- <span class="el-upload__tip" slot="tip">
                                请上传
                                <template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
                                的文件
                            </span> -->
                        </el-upload>
                        <div v-else style="display:flex;">
                            <div>
                                <el-button class="upload_btn" type="primary" icon="el-icon-upload"
                                    v-if="fileMJ == undefined && isFbState" @click="uploadTap"
                                    style="margin-bottom:5px;margin-left:20px">上传文件</el-button>
                                <zdyfileUpload v-else :uploadData="uploadData" :uploadList="tableFlieData"
                                    :uploadFileUrl="uploadFileUrl" :renyuanOptions="renyuanOptions" :value="value"
                                    @handleUploadSuccess="handleUploadSuccess">
                                </zdyfileUpload>
                            </div>
                            <el-select  v-if="isFbState" style="margin-left:10px;" v-model="fileMJ" placeholder="请选择文件密级"
                                @change="selectChange($event)">
                                <el-option v-for="(item, idx) in renyuanOptions" :key="idx" :label="item.dictLabel"
                                    :value="item.dictValue"></el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-table :data="tableFlieData" height="250" border style="width: 86.5%;float:right"
                        header-align="center">
                        <el-table-column type="index" label="序号" align="center" header-align="center">
                        </el-table-column>
                        <el-table-column prop="FILE_NAME" label="附件名称" align="center" header-align="center">
                        </el-table-column>
                        <el-table-column label="密级" v-if="isFbState">
                            <template slot-scope="scope">
                                <el-select v-model="scope.row.MJ" placeholder="请选择文件密级">
                                    <el-option v-for="(item, idx) in renyuanOptions" :key="idx" :label="item.dictLabel"
                                        :value="item.dictValue"></el-option>
                                </el-select>
                            </template>
                        </el-table-column>
                        <el-table-column prop="FILE_SIZE" label="附件大小" align="center" header-align="center">
                            <template slot-scope="scope">
                                {{ scope.row.FILE_SIZE | changeType }}
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="操作" align="center" header-align="center">
                            <template slot-scope="scope">
                                <el-button type="text" icon="el-icon-download" plain size="mini"
                                    @click="onClickDownLoadTap(scope.row)" v-if="rowInfo != undefined">下载</el-button>
                                <el-button type="text" plain icon="el-icon-delete" size="mini"
                                    @click="onClickDelTap(scope.row)">删除</el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                </el-col>
            </el-row>

        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button type="primary" @click="submitForm" :disabled="isDis">确 定</el-button>
            <el-button @click="closeDelDialog">取 消</el-button>
        </div>
    </el-dialog>
</template>
<script>
import { getusertree, addjob, getjobinfo, deletefile, updatejobinfo, listGROUPTree, editcate } from "@/api/archive/archivalAppraisal/openness/openArchivesAppraisal"
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import zdyfileUpload from "@/components/FileUpload/zdyIndex.vue" //文件上传
import { getDicts_archive } from '@/api/archive/dict/dictManageData'
import { fbstat } from "@/api/archive/fileCollection/offlinReception.js";
import {
    getdamjbyrymj
} from "@/api/archive/fileCollection/offlinReception.js";
export default {
    components: { Treeselect, zdyfileUpload },
    props: ['open', 'rowInfo'],
    watch: {
        rowInfo: {
            handler(valNew) {
                if (this.$store.getters.size == 'small') {

                    this.isStyle = true

                } else {

                    this.isStyle = false
                }
                if (valNew != undefined) { //修改
                    this.$modal.loading("正在加载...");
                    $(".el-loading-mask").css("z-index", "9999")
                    this.getDeptSelect(valNew)   //门类列表
                    this.editcatePost(valNew)
                } else { //添加
                    //获取当前时间
                    const date = new Date()
                    const year = date.getFullYear()
                    const month = ('0' + (date.getMonth() + 1)).slice(-2)
                    const day = ('0' + date.getDate()).slice(-2)
                    this.form.jiandingstartdate = year + "-" + month + "-" + day;
                    //获取当前时间戳
                    this.form.renwuno = new Date().getTime() * 1000;
                }
            }, immediate: true
        }
    },
    filters: {
        changeType(val) {
            if (val == "0") return "0B";
            var k = 1024;
            var sizes = ["B", "KB", "MB", "GB", "TB"];
            // console.log('Math.log(val)', Math.log(val));
            // console.log('Math.log(k)', Math.log(k));
            let i = Math.floor(Math.log(val) / Math.log(k));//得出该数字的单位应该是kB?MB
            return (val / Math.pow(k, i)).toPrecision(3) + "" + sizes[i];
        },
    },
    data() {
        return {

            isDis: false, //设置添加接口是否请求到，如果请求到isDis设置true
            isDisabled: "allow",//设置是否可以修改，
            form: {
                jiandingrenwuname: undefined,
                categoryId: undefined,
                renwuno: undefined,
                remark: undefined,
                qzh: undefined,
                qzhcode: undefined,
                chushenpeople: undefined,
                jiandingleader: undefined,
                fushenpeople: undefined,
                shendingpeople: undefined,
                jiandingstartdate: undefined
            },
            uploadData: undefined,//上传携带的参数
            uploadValue: undefined, //选择上传的文件
            fileSize: 25,
            deptOptions: [],//档案门类下拉
            userTreeList: [],
            tableFlieData: [],//文件列表数据
            value: [], //判断当前是否又文件列表数据，如果有，修改渲染，如果是【】，清空之前的数据
            uploadFileUrl: process.env.VUE_APP_BASE_API + "/archive/isopenidentify/upload",
            rules: {
                jiandingrenwuname: [{ required: true, message: '请输入鉴定任务名称', trigger: 'blur' }],
                categoryId: [
                    { required: true, message: '请选择档案门类', trigger: 'blur' },
                ],
                jiandingleader: [{ required: true, message: '请选择鉴定组长', trigger: 'blur' }],
                chushenpeople: [{ required: true, message: '请选择初审组人员', trigger: 'blur' }],
                fushenpeople: [{ required: true, message: '请选择复审组人员', trigger: 'blur' }],
                shendingpeople: [{ required: true, message: '请选择审定组人员', trigger: 'blur' }],
            },
            renyuanOptions: [],//密级下拉列表
            isFbState: false,
            fileMJ: undefined,
        }

    },
    created() {
        //门类列表
        this.getDeptSelect();
        //人员列表
        this.getusertreeList();
        fbstat().then(res => {  //false=不是分保，true=是分保 
            this.isFbState = res.data
            if (this.isFbState) {
                //密级下拉列表
                getDicts_archive("MJ").then(res => { //人员密级
                    getdamjbyrymj().then(resdata => { //此接口没有返回dictLabel，需要组装接口
                        console.log(resdata, "------------------------")
                        var mjdata = [];
                        for (var i in resdata.data) {
                            for (var j in res.data) {
                                if (resdata.data[i].daMj == res.data[j].dictValue) {
                                    mjdata.push(res.data[j])
                                }
                            }
                        }

                        this.renyuanOptions = mjdata
                        console.log(this.renyuanOptions, "------------------------------------------")

                    })
                })
            }
        })



    },
    methods: {
        //判断修改时档案门类是否禁用
        editcatePost(valNew) {
            editcate(valNew.ID).then(res => {
                console.log(res)
                this.isDisabled = res.msg
            })
        },

        // 只能选择数据下面有children 的数据，没有children的时候禁用复选框
        normalizer(node) {
            if (node.type == 'd') {
                if (node.children == undefined||node.children == null||!node.children.length) {
                    node["children"] = undefined
                    node['isDisabled'] = true;
                }

            }

            if(node.type=='u'){
                if (node.children == null || node.children == undefined) {
                delete node.children;
                }
                
            }
            return node
            //去掉children=[]的children属性
            // if (node.children && !node.children.length) {
            //     delete node.children;
            // }
            // if (node.isLeaf == 'Y' && node.typeLevel != 3) {
            //     node['isDisabled'] = true;
            // }
            // return {
            //     id: node.typeId,
            //     label: node.typeName,
            //     children: node.children,
            // }
        },

         // 只能选择数据下面有children 的数据，没有children的时候禁用
         normalizerCategoryID(node) {
            if (node.nodeType == 'fonds') {
                if (node.children == undefined || node.children == null || !node.children.length) {

                    node['isDisabled'] = true;
                }

            }
            if (node.children == null || node.children == undefined || !node.children.length) {
                delete node.children;
            }
            return node
        },
        /** 档案门类列表*/
        getDeptSelect(valNew) {
            listGROUPTree().then(response => {
                console.log(response, "sdklfjkldsjfklsdjfkldsjfklsdjflkds")
                for (var i in response.data[0].children) {
                    for (var j in response.data[0].children[i].children) {
                        response.data[0].children[i].children[j].parentId = response.data[0].children[i].id;
                        response.data[0].children[i].children[j].parentLabel = response.data[0].children[i].label;
                        response.data[0].children[i].children[j].fondsCode = response.data[0].children[i].fondsCode
                    }
                }

                if (valNew != undefined) { //修改
                    getjobinfo(valNew.ID).then(res => {
                        if (res.data.jobinfo.CHUSHENPEOPLE != undefined && res.data.jobinfo.CHUSHENPEOPLE != "") {
                            this.form.chushenpeople = res.data.jobinfo.CHUSHENPEOPLE.split(",")
                        }
                        if (res.data.jobinfo.JIANDINGLEADER != undefined) {
                            this.form.jiandingleader = res.data.jobinfo.JIANDINGLEADER.split(",")

                        }
                        if (res.data.jobinfo.FUSHENPEOPLE != undefined && res.data.jobinfo.FUSHENPEOPLE != "") {
                            this.form.fushenpeople = res.data.jobinfo.FUSHENPEOPLE.split(",")
                        }
                        if (res.data.jobinfo.SHENDINGPEOPLE != undefined) {
                            this.form.shendingpeople = res.data.jobinfo.SHENDINGPEOPLE.split(",")
                        }
                        this.form.remark = res.data.jobinfo.REMARK;
                        this.form.jiandingrenwuname = res.data.jobinfo.JIANDINGRENWUNAME;
                        this.form.qzh = res.data.jobinfo.QZH;
                        this.form.renwuno = res.data.jobinfo.RENWUNO;
                        this.form.jiandingstartdate = res.data.jobinfo.JIANDINGSTARTDATE;
                        this.form.categoryId = res.data.jobinfo.categoryId;

                        this.form.qzhcode = res.data.jobinfo.QZHCODE;
                        this.$modal.closeLoading()
                        this.tableFlieData = res.data.fileinfo;
                        this.uploadData = { renwuid: valNew.ID, mj: this.fileMJ }
                        this.value = res.data.fileinfo;
                        this.$modal.closeLoading()
                    })
                }
                this.deptOptions = response.data
            });
        },
        //上传文件MJ类型的下拉框
        selectChange(event) {
            this.uploadData["mj"] = this.fileMJ
        },
        //触发档案门类下拉,根据门类ID获取当前门类下的全宗号lable
        changeSelectTap(val) {
            this.form.qzhcode = val.fondsCode;
            this.form.qzh = val.parentId;

            // for (var i in this.deptOptions) {
            //     if (this.deptOptions[i].id == val) {
            //         // console.log(this.deptOptions[i],"222222222222222222222222222222")
            //         this.qzhName = this.deptOptions[i].fondsCode;
            //         this.form.qzh = this.deptOptions[i].parentId;

            //     }
            // }
        },
        //获取人员树
        getusertreeList() {
            getusertree().then(res => {
                // console.log(res, "sdlkfjkl")
                this.userTreeList = res.data;
            })
        },
        //初审组人员 @select="selectPatenteeidsDepart"  //选择项被选择时的函数 -->
        selectPatenteeidsDepart(node, instanceId) {
            if (!this.form.chushenpeople) {
                this.form.chushenpeople = [];
            }

            this.form.chushenpeople.push(node.id);

        },
        //初审组人员  @deselect="deSelectPatenteeidsDepart" // 选择项被取消时的函数-->
        deSelectPatenteeidsDepart(node, instanceId) {
            if (!this.form.chushenpeople) {
                this.form.chushenpeople = [];
            }
            let index = _.indexOf(this.form.chushenpeople, node.id);
            this.form.chushenpeople.splice(index, 1);

        },

        //复审组人员@select="selectPatenteeidsDepart"  //选择项被选择时的函数 -->
        selectPatenteeidsDepart1(node, instanceId) {
            if (!this.form.fushenpeople) {
                this.form.fushenpeople = [];
            }

            this.form.fushenpeople.push(node.id);

        },
        //复审组人员@deselect="deSelectPatenteeidsDepart" // 选择项被取消时的函数 -->
        deSelectPatenteeidsDepart1(node, instanceId) {
            if (!this.form.fushenpeople) {
                this.form.fushenpeople = [];
            }
            let index = _.indexOf(this.form.fushenpeople, node.id);
            this.form.fushenpeople.splice(index, 1);

        },
        closeDelDialog() {
            this.$emit("closeDelDialog")
        },
        //确定
        submitForm() {

            this.$refs.form.validate((valid) => {
                const formData = new FormData();

                if (valid) {

                    if (!this.rowInfo) { //添加
                        if (this.form.fushenpeople != undefined) {
                            formData.append("fushenpeople", this.form.fushenpeople);
                        }
                        if (this.form.chushenpeople != undefined) {
                            formData.append("chushenpeople", this.form.chushenpeople);
                        }
                        if (this.form.jiandingleader != undefined) {
                            formData.append("jiandingleader", this.form.jiandingleader);
                        }
                        if (this.form.shendingpeople != undefined) {
                            formData.append("shendingpeople", this.form.shendingpeople);
                        }
                        if (this.form.remark != undefined) {
                            formData.append("remark", this.form.remark);
                        }
                        formData.append("jiandingstartdate", this.form.jiandingstartdate);
                        formData.append("renwuno", this.form.renwuno);
                        formData.append("jiandingrenwuname", this.form.jiandingrenwuname);
                        if (this.tableFlieData.length > 0) {
                            if (this.isFbState) { //如果是分保true
                                if (this.tableFlieData[0].MJ == null || this.tableFlieData[0].MJ == "" || this.tableFlieData[0].MJ == undefined) {
                                    this.$message({ message: "请输入" + this.tableFlieData[0].FILE_NAME + "的文件密级哦~", type: 'warning' })
                                    return
                                }
                                formData.append("mj", this.tableFlieData[0].MJ);
                            }
                            /* formData格式提交： */
                            this.form.file = this.tableFlieData[0].raw;
                            formData.append("file", this.form.file);

                        }

                        formData.append("categoryId", this.form.categoryId);
                        formData.append("qzh", this.form.qzh);
                        formData.append("qzhcode", this.form.qzhcode);
                        this.isDis = true;
                        addjob(formData).then(res => {
                            console.log(res.code)
                            if (res.code == "200") {
                                this.isDis = false;
                                this.$modal.msgSuccess("添加成功");
                                this.$emit("submitForm")
                            }
                        })
                    } else { //修改
                        this.form.id = this.rowInfo.ID;
                        var fushenpeople = ""
                        if (this.form.fushenpeople != undefined) {
                            fushenpeople = this.form.fushenpeople.join(",")
                        }
                        var chushenpeople = ""
                        if (this.form.chushenpeople != undefined) {
                            chushenpeople = this.form.chushenpeople.join(",")
                        }
                        var jiandingleader = ""
                        if (this.form.jiandingleader != undefined) {
                            if (typeof (this.form.jiandingleader) != "string") {
                                jiandingleader = this.form.jiandingleader.join(",")
                            } else {
                                jiandingleader = this.form.jiandingleader
                            }
                        }
                        var shendingpeople = ""
                        if (this.form.shendingpeople != undefined) {
                            if (typeof (this.form.shendingpeople) != "string") {
                                shendingpeople = this.form.shendingpeople.join(",")
                            } else {
                                shendingpeople = this.form.shendingpeople
                            }

                        }


                        updatejobinfo({
                            categoryId: this.form.categoryId,
                            chushenpeople: chushenpeople,
                            fushenpeople: fushenpeople,
                            id: this.form.id,
                            jiandingleader: jiandingleader,
                            jiandingrenwuname: this.form.jiandingrenwuname,
                            jiandingstartdate: this.form.jiandingstartdate,
                            qzh: this.form.qzh,
                            qzhcode: this.form.qzhcode,
                            remark: this.form.remark,
                            renwuno: this.form.renwuno,
                            shendingpeople: shendingpeople,

                        }).then(res => {
                            if (res.code == "200") {
                                this.isDis = false;
                                this.$modal.msgSuccess("修改成功");
                                this.$emit("submitForm")
                            }
                        })
                    }




                } else {
                    // console.log('error submit!!');
                    return false;
                }
            });
        },
        uploadTap() {
            if (this.fileMJ == undefined) {
                this.$message.warning(`请选择密级`);
                return false
            }
        },
        //添加上传成功
        handleChange(file) {
            this.tableFlieData = [];
            this.tableFlieData.push({
                FILE_NAME: file.name,
                FILE_SIZE: file.size,
                MJ: "",
                raw: file.raw
            });

        },

        //修改上传成功
        handleUploadSuccess(data) {

            this.tableFlieData = data;
        },

        //删除
        onClickDelTap(row) {
            var that = this;
            if (row.ID != undefined) {
                this.$modal.confirm('删除后不可恢复,确定要删除当前' + row.FILE_NAME + '文件吗?').then(function () {
                    deletefile(row.ID).then(res => {
                        if (res.code == "200") {
                            console.log(that.tableFlieData, "klsdjfklsj")
                            for (var i in that.tableFlieData) {
                                if (that.tableFlieData[i].ID == row.ID) {
                                    that.tableFlieData.splice(i, 1)
                                }
                            }
                            that.$modal.msgSuccess("删除成功");
                        }
                    });

                }).catch(() => { });
            } else {
                this.tableFlieData = [];
                this.form.file = undefined;
            }
        },
        /**
         * var data = 'aaa-bbb'
            //截取符号前面部分
            getCaption(data,0) //输出aaa
            //截取符号后面部分
            getCaption(data,1) //输出bbb
         */
        getCaption(obj, state) {
            var index = obj.lastIndexOf("\.");
            if (state == 0) {
                obj = obj.substring(0, index);
            } else {
                obj = obj.substring(index + 1, obj.length);
            }
            return obj;
        },
        //下载
        onClickDownLoadTap(row) {
            var that = this;
            console.log(this.getCaption(row.FILE_NAME, 1), row, "sdlkjfkl")
            var str = this.getCaption(row.FILE_NAME, 1)
            this.download('/archive/isopenidentify/download/' + row.ID, {

            }, `${new Date().getTime()}.${str}`)
        },
    }
}
</script>

<style lang="scss" scoped>
::v-deep .el-dialog {
    padding: 0px 30px 20px 0px !important;
    display: flex;
    flex-direction: column;
    margin: 0 !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: calc(100% - 30px);
    max-width: calc(100% - 30px);
}

::v-deep .el-dialog .el-dialog__body {
    flex: 1;
    overflow: auto;
}

::v-deep .el-form-item__content {
    line-height: 26px;
}

::v-deep .vue-treeselect__multi-value {
    margin: 0 !important;
}
</style>
